1. Field of the Invention
The present invention relates to mixed-content color management or, more particularly, to a system and method for independently managing color (or other display parameters) for different objects within a single page of a document, or within a single frame of a video.
2. Description of Related Art
Page description languages (PDLs) are formats that describe the content of a document. The PDL can describe how to draw a particular graphic, where to place text with a particular font type and where to place an image. Examples of PDLs include Adobe PostScript (PS), PDF, PCL and XPS. These languages are often called vector based document formats.
A rendering engine for page description languages (PDLs) is software that takes the content of a PDL file and creates raster bit map images of each page at a specified resolution. Examples of rendering engines include Ghostscript™ and MuPDF™. The process of converting the pages of a document to bit maps is referred to as rasterizing or rendering.
Within the vector based format for the document, there can exist on a single page a number of different object types. As can be seen in FIG. 3, a page 300 can include, but is not limited to, text 310, graphics 320 and at least one image 330. Typically, within the vector based document format these objects are defined for particular color spaces. For example, a graphic object may be defined to be drawn with particular RGB (Red, Green Blue) values, an image could be defined in a CMYK (Cyan, Magenta, Yellow and Black) color space and a text object may be defined to be drawn with a particular gray level. These color spaces will be referred to as source color spaces.
When a page is rendered, the raster image created by the rendering engine for that page has all of its pixels in a single output color space. This output color space is typically dependent upon the device to which the page is going to be viewed. For example, if you are viewing the page on a computer, tablet, hand-held device, or projector, the output color space would typically be RGB. These devices will be referred to as soft-copy devices. If you were printing the page on a color printer, the most common output color space would be CMYK.
Some PDLs allow the use of transparency when drawing objects. This allows for objects that lie below other objects to be partially visible. FIG. 4 shows an example of a graphic 420, which is semi-transparent and may be of a particular color (e.g., red), that is laid partially over an image 430, which may also be of a particular color (e.g., blue). Then, semi-transparent text 410, which may also be of a particular color (e.g., green), is also laid down over the image 430 and the rectangle 420, thereby creating an overlap between the three. Note that the overlapping region is a blend of a combination of text, graphic and image object source colors.
The most common digital format that is used for defining a color space is the ICC profile. ICC stands for International Color Consortium. The ICC profile can be used in the PDF and XPS formats to define the source colors of objects in the document. In addition, an ICC profile can be used to define the output color space. The ICC profile describes a mapping between a device color space like RGB or CMYK and a color space that relates perceptually to the human visual system.
Software that converts from the source color space to the output (or destination) color space is referred to as the color management module (CMM). LittleCMS™ is an example of a CMM that uses source ICC profiles and destination ICC profiles to convert from source colors to output colors. The conversion of source colors to destination colors by the CMM is usually performed using multi-dimensional look-up-tables (MLUTs). In addition to the color spaces, a CMM often has other parameters that can affect the exact transform that is performed. These include but are not limited to rendering intent, black point compensation and black preservation.
Many objects within a document format like PDF do not use source ICC profiles to define an object color but instead rely upon a generic RGB or CMYK color space. In these cases, a “default” RGB ICC profile can be assigned to the generic RGB source color space and used by the CMM.
Often a document may include multiple objects (i.e., images, graphics and text) that are all colorimetrically defined in terms of the same default RGB color space. In this case, these objects all undergo the same transformation with the CMM from the default RGB color space to the device output RGB color space if viewing with a soft-copy device or to the device output CMYK color space if printing with a printer.
Typically a person viewing a page from such a document would desire to have high contrast black text, highly color saturated graphics and images that are perceptually pleasing and well balanced. Often these goals are conflicting in that the transform to achieve high contrast black text is quite different from that used to achieve a visually pleasing image. As mentioned above, however, it is common to find documents where the source color spaces are the same for different objects leading to the same color transformation being performed for these objects in mapping from source to destination color space.
Because the foregoing methods for managing color can produce objects that are not optimized for viewing, it would be advantageous to provide an improved color management system and method that can generate saturated graphics, black text, and perceptually pleasing images in a rasterized output.